#-----------------------------------------------------------------------------
#
# ITKConfig.cmake - ITK CMake configuration file for external projects.
#
# This file is configured by ITK and used by the UseITK.cmake module
# to load ITK's settings for an external project.
@ITK_CONFIG_CODE@

# The C and C++ flags added by ITK to the cmake-configured flags.
set(ITK_REQUIRED_C_FLAGS "@ITK_REQUIRED_C_FLAGS@")
set(ITK_REQUIRED_CXX_FLAGS "@ITK_REQUIRED_CXX_FLAGS@")
set(ITK_REQUIRED_LINK_FLAGS "@ITK_REQUIRED_LINK_FLAGS@")

# The ITK version number
set(ITK_VERSION_MAJOR "@ITK_VERSION_MAJOR@")
set(ITK_VERSION_MINOR "@ITK_VERSION_MINOR@")
set(ITK_VERSION_PATCH "@ITK_VERSION_PATCH@")

# If ITK was built with version 3 compatibility features.
set(ITKV3_COMPATIBILITY "@ITKV3_COMPATIBILITY@")

# The location of the UseITK.cmake file.
set(ITK_USE_FILE "@ITK_USE_FILE@")

# Whether ITK was built with shared libraries.
set(ITK_BUILD_SHARED "@BUILD_SHARED_LIBS@")

# List of available ITK modules.
set(ITK_MODULES_ENABLED "@ITK_CONFIG_MODULES_ENABLED@")

# Import ITK targets.
if(NOT ITK_TARGETS_IMPORTED@ITK_CONFIG_TARGETS_CONDITION@)
  set(ITK_TARGETS_IMPORTED 1)
  include("@ITK_CONFIG_TARGETS_FILE@")
endif()

set(ITK_USE_REVIEW "@ITK_USE_REVIEW@")

# Load module interface macros.
include("@ITK_CONFIG_MODULE_API_FILE@")

# Compute set of requested modules.
if(ITK_FIND_COMPONENTS)
  # Specific modules requested by find_package(ITK).
  set(ITK_MODULES_REQUESTED "${ITK_FIND_COMPONENTS}")
elseif(NOT "${CMAKE_VERSION}" VERSION_GREATER 2.8.4.20110407)
  # CMake 2.8.4 and lower do not forward the components list through
  # their FindITK.cmake module, so unless the application called
  #
  #   find_package(ITK NO_MODULE ...)
  #
  # then only the per-component variables ITK_FIND_REQUIRED_<mod> will
  # have leaked through.
  set(ITK_MODULES_REQUESTED "")
  get_cmake_property(_vars VARIABLES)
  foreach(v IN LISTS _vars)
    if("x${v}" MATCHES "^xITK_FIND_REQUIRED_" AND ${v})
      string(REGEX REPLACE "^ITK_FIND_REQUIRED_" "" _mod "${v}")
      list(APPEND ITK_MODULES_REQUESTED ${_mod})
    endif()
  endforeach()
endif()
if(NOT ITK_MODULES_REQUESTED)
  # No specific modules requested.  Use all of them.
  set(ITK_MODULES_REQUESTED "${ITK_MODULES_ENABLED}")
endif()

# Load requested modules and their dependencies into variables:
#  ITK_LIBRARIES       = Libraries to link
#  ITK_INCLUDE_DIRS    = Header file search path
#  ITK_LIBRARY_DIRS    = Library search path (for outside dependencies)
itk_module_config(ITK ${ITK_MODULES_REQUESTED})

# Add configuration with FFTW
set(ITK_USE_FFTWD "@USE_FFTWD@")
set(ITK_USE_FFTWF "@USE_FFTWF@")
set(ITK_USE_SYSTEM_FFTW "@USE_SYSTEM_FFTW@")
set(ITK_FFTW_INCLUDE_PATH "@FFTW_INCLUDE_PATH@")
set(ITK_FFTW_LIBDIR "@FFTW_LIBDIR@")
